#ifndef _PLATFORM_H_
#define _PLATFORM_H_

#include <stdint.h>
#include "event_queue.h"
#include "event_type.h"
#include "myalloc.h"

extern struct event_queue event_queue;

void board_init(void);
uint64_t board_get_systime(void);

/* 
 * param:
 *	dev_num: start from 0
 */
uint16_t board_uart_send(uint8_t dev_num, uint8_t* tx_buf, uint16_t size);

void board_write_flash(uint16_t addr, uint16_t data);
uint16_t board_read_flash(uint16_t addr);

void board_led_on(uint8_t led_id);
void board_led_off(uint8_t led_id);
void board_led_toggle(uint8_t led_id);

uint16_t board_write_dac(uint16_t *ch1_val, uint16_t *ch2_val,
		     uint16_t len);

#endif
